Graphics application programming interfaces (“API”) are used by programmers to create 2D and 3D graphics. The Open Graphics Library (“Open GL”) is a widely used API. The Open GL architecture allows programmers to produce consistent visual display results on any OpenGL API-compliant hardware regardless of the operating system. OpenGL for embedded systems (“OpenGL ES”) is a subset of the OpenGL API designed for embedded devices such as mobile phones, PDAs, and video game consoles.
For example, triangle 110 depicted in FIG. 1A includes three vertices, a red vertex at (1,2), a blue vertex at (0,0), and a green vertex at (0,2). This image may be drawn by using two arrays: a position array, PositionArray: [(0,0),(1,2),(2,0)] and a color array, ColorArray: [blue,red,green]. The image may be drawn in OpenGL or OpenGL ES by calling a function which renders primitives from the array data and identifying the two arrays for the vertex attributes:
VertexAttrib #0→PositionArray
VertexAttrib #1→ColorArray.
In order to draw another triangle in a solid color, for example in orange, the user may instruct OpenGL ES to use a constant color:
VertexAttrib #0→PositionArray
VertexAttrib #1→Constant Orange.
OpenGL or OpenGL ES may then use orange for all 3 vertices of the triangle and generate an orange triangle 120 as shown in FIG. 1B.
Similarly, using OpenGL ES, VertexAttrib #0 may be set to a constant value. However if the user is using OpenGL and VertexAttrib #0 is set to a constant value, OpenGL will not draw anything at all. In another example, if the user queries OpenGL asking “to what constant value did I set VertexAttrib #0?,” OpenGL will not identify the constant. Thus, for at least two examples above, OpenGL and OpenGL ES may provide different results when displaying the results the same code.